﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DependencyInjection;
using PolarExpress.View.Interfaces;
using PolarExpress.Model.Interfaces;
using PolarExpress.Controller.Interfaces;

namespace PolarExpress.Controller
{
    public class MainController : IMainController
    {
        IMainView _view;

        IProject _project;

        IErrorController _errorController;
        IEventController _eventController;
        IExplorerController _explorerController;
        IOutputController _outputController;
        IPlayController _playController;
        IPropertiesController _propertiesController;
        ISceneController _sceneController;
        IToolboxController _toolboxController;
        IWarningController _warningController;

        [Inject()]
        public MainController(
            IMainView view, 
            IProject project,
            IErrorController errorController,
            IEventController eventController,
            IExplorerController explorerController,
            IOutputController outputController,
            IPlayController playController,
            IPropertiesController propertiesController,
            ISceneController sceneController,
            IToolboxController toolboxController,
            IWarningController warningController)
        {
            _view = view;

            _project = project;

            _errorController = errorController;
            _eventController = eventController;
            _explorerController = explorerController;
            _outputController = outputController;
            _playController = playController;
            _propertiesController = propertiesController;
            _sceneController = sceneController;
            _toolboxController = toolboxController;
            _warningController = warningController;
        }

        public event ModelChangedHandler ModelChanged;

        public IModel Model
        {
            get
            {
                return _project;
            }
            set
            {
                if (value is IProject)
                {
                    _project = value as IProject;
                }
            }
        }

        public IView View
        {
            get
            {
                return _view;
            }
            set
            {
                if (value is IMainView)
                {
                    _view = value as IMainView;
                }
            }
        }

        public void Open()
        {
            throw new NotImplementedException();
        }

        public void Save()
        {
            throw new NotImplementedException();
        }

        public void SaveAs()
        {
            throw new NotImplementedException();
        }

        public void Undo()
        {
            throw new NotImplementedException();
        }

        public void Redo()
        {
            throw new NotImplementedException();
        }

        public void Add()
        {
            throw new NotImplementedException();
        }

        public void Remove()
        {
            throw new NotImplementedException();
        }

        public void Cut()
        {
            throw new NotImplementedException();
        }

        public void Copy()
        {
            throw new NotImplementedException();
        }

        public void Paste()
        {
            throw new NotImplementedException();
        }

        public void Move()
        {
            throw new NotImplementedException();
        }

        public void Scale()
        {
            throw new NotImplementedException();
        }

        public void Rotate()
        {
            throw new NotImplementedException();
        }

        public void Select()
        {
            throw new NotImplementedException();
        }

        public void MoveForward()
        {
            throw new NotImplementedException();
        }

        public void MoveBackward()
        {
            throw new NotImplementedException();
        }

        public void MoveToFront()
        {
            throw new NotImplementedException();
        }

        public void MoveToBack()
        {
            throw new NotImplementedException();
        }
    }
}
